package com.example.demo2.common.api;

public class LqApiProtocolException extends LqApiResponseException {
    private static final long serialVersionUID = 1L;
    private LqApiError error;

    public LqApiProtocolException(LqApiError error) {
        super(errorMessage(error));
        this.error = error;
    }

    private static String errorMessage(LqApiError error) {
        return error.getMsg() + "\n" + error;
    }

    public LqApiError getError() {
        return error;
    }

    public String getDebugMessage() {
        return error.getDebugMessage();
    }
}
